Skip to main content

KmsClient

Trait KmsClient 

Source
pub trait KmsClient: Send + Sync {
    // Required methods
    fn get_dek<'life0, 'life1, 'async_trait>(
        &'life0 self,
        column: &'life1 str,
        version: u32,
    ) -> Pin<Box<dyn Future<Output = Result<DekBuffer, KmsError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn unwrap_dek<'life0, 'life1, 'async_trait>(
        &'life0 self,
        wrapped_dek: &'life1 [u8],
        version: u32,
    ) -> Pin<Box<dyn Future<Output = Result<DekBuffer, KmsError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn rotate_key<'life0, 'life1, 'async_trait>(
        &'life0 self,
        column: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<u32, KmsError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

KMS 客户端 trait

Required Methods§

Source

fn get_dek<'life0, 'life1, 'async_trait>( &'life0 self, column: &'life1 str, version: u32, ) -> Pin<Box<dyn Future<Output = Result<DekBuffer, KmsError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

获取 DEK(数据加密密钥)

Source

fn unwrap_dek<'life0, 'life1, 'async_trait>( &'life0 self, wrapped_dek: &'life1 [u8], version: u32, ) -> Pin<Box<dyn Future<Output = Result<DekBuffer, KmsError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

解包 DEK(从 wrapped DEK 还原明文 DEK)

Source

fn rotate_key<'life0, 'life1, 'async_trait>( &'life0 self, column: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<u32, KmsError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

轮换密钥,返回新版本号

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§