You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Security should be considered a top priority when developing any and all applications. With the onset of artificial intelligence enabled applications, security is even more important. In this article various aspects of Azure Cognitive Services security are outlined, such as the use of transport layer security, authentication, and securely configuring sensitive data.
17
17
18
18
## Transport Layer Security (TLS)
19
19
@@ -83,32 +83,59 @@ To get an environment variable, it must be read into memory. Depending on the la
83
83
84
84
# [C#](#tab/csharp)
85
85
86
+
For more information, see <ahref="https://docs.microsoft.com/dotnet/api/system.environment.getenvironmentvariable"target="_blank">`Environment.GetEnvironmentVariable` <spanclass="docon docon-navigate-external x-hidden-focus"></span></a>.
87
+
86
88
```csharp
87
-
// Get the named env var, and assign it to the value variable
88
-
varvalue=
89
-
Environment.GetEnvironmentVariable(
90
-
"ENVIRONMENT_VARIABLE_KEY");
89
+
usingstaticSystem.Environment;
90
+
91
+
classProgram
92
+
{
93
+
staticvoidMain()
94
+
{
95
+
// Get the named env var, and assign it to the value variable
96
+
varvalue=
97
+
GetEnvironmentVariable(
98
+
"ENVIRONMENT_VARIABLE_KEY");
99
+
}
100
+
}
91
101
```
92
102
93
103
# [C++](#tab/cpp)
94
104
105
+
For more information, see <ahref="https://docs.microsoft.com/cpp/c-runtime-library/reference/getenv-wgetenv"target="_blank">`getenv` <spanclass="docon docon-navigate-external x-hidden-focus"></span></a>.
106
+
95
107
```cpp
96
-
// Get the named env var, and assign it to the value variable
97
-
auto value =
98
-
getenv("ENVIRONMENT_VARIABLE_KEY");
108
+
#include<stdlib.h>
109
+
110
+
intmain()
111
+
{
112
+
// Get the named env var, and assign it to the value variable
113
+
auto value =
114
+
getenv("ENVIRONMENT_VARIABLE_KEY");
115
+
}
99
116
```
100
117
101
118
# [Java](#tab/java)
102
119
120
+
For more information, see <ahref="https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#getenv(java.lang.String)"target="_blank">`System.getenv` <spanclass="docon docon-navigate-external x-hidden-focus"></span></a>.
121
+
103
122
```java
104
-
// Get the named env var, and assign it to the value variable
// Get the named env var, and assign it to the value variable
128
+
String value =
129
+
System.getenv(
130
+
"ENVIRONMENT_VARIABLE_KEY")
131
+
}
132
+
}
108
133
```
109
134
110
135
# [Node.js](#tab/node-js)
111
136
137
+
For more information, see <ahref="https://nodejs.org/api/process.html#process_process_env"target="_blank">`process.env` <spanclass="docon docon-navigate-external x-hidden-focus"></span></a>.
138
+
112
139
```javascript
113
140
// Get the named env var, and assign it to the value variable
114
141
constvalue=
@@ -117,6 +144,8 @@ const value =
117
144
118
145
# [Python](#tab/python)
119
146
147
+
For more information, see <ahref="https://docs.python.org/2/library/os.html#os.environ"target="_blank">`os.environ` <spanclass="docon docon-navigate-external x-hidden-focus"></span></a>.
148
+
120
149
```python
121
150
import os
122
151
@@ -126,6 +155,8 @@ value = os.environ['ENVIRONMENT_VARIABLE_KEY']
126
155
127
156
# [Objective-C](#tab/objective-c)
128
157
158
+
For more information, see <ahref="https://developer.apple.com/documentation/foundation/nsprocessinfo/1417911-environment?language=objc"target="_blank">`environment` <spanclass="docon docon-navigate-external x-hidden-focus"></span></a>.
159
+
129
160
```objectivec
130
161
// Get the named env var, and assign it to the value variable
131
162
NSString* value =
@@ -134,8 +165,6 @@ NSString* value =
134
165
135
166
---
136
167
137
-
For more information, see <ahref="https://docs.microsoft.com/azure/azure-app-configuration/overview"target="_blank">Azure App Configuration <spanclass="docon docon-navigate-external x-hidden-focus"></span></a>.
138
-
139
168
## Next steps
140
169
141
170
* Explore the various [Cognitive Services](welcome.md)
0 commit comments