pub struct CryptoClient(Rc<Client>);
Tuple Fields§
§0: Rc<Client>
Implementations§
Source§impl CryptoClient
impl CryptoClient
Sourcepub async fn initialize_user_crypto(
&self,
req: InitUserCryptoRequest,
) -> Result<(), EncryptionSettingsError>
pub async fn initialize_user_crypto( &self, req: InitUserCryptoRequest, ) -> Result<(), EncryptionSettingsError>
Initialization method for the user crypto. Needs to be called before any other crypto operations.
Sourcepub async fn initialize_org_crypto(
&self,
req: InitOrgCryptoRequest,
) -> Result<(), EncryptionSettingsError>
pub async fn initialize_org_crypto( &self, req: InitOrgCryptoRequest, ) -> Result<(), EncryptionSettingsError>
Initialization method for the organization crypto. Needs to be called after
initialize_user_crypto
but before any other crypto operations.
Sourcepub fn make_key_pair(
&self,
user_key: String,
) -> Result<MakeKeyPairResponse, Error>
pub fn make_key_pair( &self, user_key: String, ) -> Result<MakeKeyPairResponse, Error>
Generates a new key pair and encrypts the private key with the provided user key. Crypto initialization not required.
Sourcepub fn verify_asymmetric_keys(
&self,
request: VerifyAsymmetricKeysRequest,
) -> Result<VerifyAsymmetricKeysResponse, Error>
pub fn verify_asymmetric_keys( &self, request: VerifyAsymmetricKeysRequest, ) -> Result<VerifyAsymmetricKeysResponse, Error>
Verifies a user’s asymmetric keys by decrypting the private key with the provided user key. Returns if the private key is decryptable and if it is a valid matching key. Crypto initialization not required.
Trait Implementations§
Source§impl From<CryptoClient> for JsValue
impl From<CryptoClient> for JsValue
Source§fn from(value: CryptoClient) -> Self
fn from(value: CryptoClient) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for CryptoClient
impl FromWasmAbi for CryptoClient
Source§impl IntoWasmAbi for CryptoClient
impl IntoWasmAbi for CryptoClient
Source§impl LongRefFromWasmAbi for CryptoClient
impl LongRefFromWasmAbi for CryptoClient
Source§impl OptionFromWasmAbi for CryptoClient
impl OptionFromWasmAbi for CryptoClient
Source§impl OptionIntoWasmAbi for CryptoClient
impl OptionIntoWasmAbi for CryptoClient
Source§impl RefFromWasmAbi for CryptoClient
impl RefFromWasmAbi for CryptoClient
Source§type Anchor = RcRef<CryptoClient>
type Anchor = RcRef<CryptoClient>
The type that holds the reference to
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl RefMutFromWasmAbi for CryptoClient
impl RefMutFromWasmAbi for CryptoClient
Source§impl TryFromJsValue for CryptoClient
impl TryFromJsValue for CryptoClient
Source§impl VectorFromWasmAbi for CryptoClient
impl VectorFromWasmAbi for CryptoClient
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[CryptoClient]>
Source§impl VectorIntoJsValue for CryptoClient
impl VectorIntoJsValue for CryptoClient
fn vector_into_jsvalue(vector: Box<[CryptoClient]>) -> JsValue
Source§impl VectorIntoWasmAbi for CryptoClient
impl VectorIntoWasmAbi for CryptoClient
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[CryptoClient]>) -> Self::Abi
Source§impl WasmDescribe for CryptoClient
impl WasmDescribe for CryptoClient
Source§impl WasmDescribeVector for CryptoClient
impl WasmDescribeVector for CryptoClient
Auto Trait Implementations§
impl Freeze for CryptoClient
impl !RefUnwindSafe for CryptoClient
impl !Send for CryptoClient
impl !Sync for CryptoClient
impl Unpin for CryptoClient
impl !UnwindSafe for CryptoClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::Abi
Source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.