Key Management
Manage the encryption keys associated with virtual card and transaction data.
Creating Keys
try {
const result = await virtualCardsClient.createKeysIfAbsent()
if (result.symmetricKey.created || result.keyPair.created) {
// Prompt user or automatically handle backing up of new key or keys
}
} catch (error) {
// Handle/notify user of errors
}do {
let result = try await virtualCardsClient.createKeysIfAbsent()
if (result.symmetricKey.created || result.keyPair.created) {
// Prompt user or automatically handle backing up of new key or keys
}
catch {
// Handle/notify user of errors
}launch {
try {
val result = withContext(Dispatchers.IO) {
virtualCardsClient.createKeysIfAbsent()
}
if (result.symmetricKey.created || result.keyPair.created) {
// Prompt user or automatically handle backing up of new key or keys
}
} catch (e: VirtualCardException) {
// Handle/notify user of exception
}
}Last updated