React Native
React Native
Example: Crypt2.DecodeString method
Demonstrates how to call the DecodeString method.Chilkat React Native Downloads
import { Crypt2 } from '@chilkat/react-native'
function chilkatExample() {
const crypt2 = new Crypt2();
// The string "Hello World" in base64 (using the utf-8 byte representation) is "SGVsbG8gV29ybGQ="
const encodedStr = 'SGVsbG8gV29ybGQ=';
const encoding = 'base64';
const charset = 'utf-8';
const str = crypt2.decodeString(encodedStr, charset, encoding);
console.log(str);
// Output is "Hello World"
}