Added secure implementation for iOS and Android