write method
Stores secret under handle, replacing any current value.
Implementation
@override
Future<void> write(String handle, String secret) async {
_checkName(handle, 'handle');
try {
final stored = _encode(secret);
switch (_os) {
case 'macos':
await _macWrite(handle, stored);
case 'windows':
_windowsWrite(handle, stored);
default:
await _linuxWrite(handle, stored);
}
} on TomSecretStoreException {
rethrow;
} on Object catch (e) {
throw TomSecretStoreException(TomSecretStoreStep.write, e);
}
}